﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Invoicing.sys
{
    public partial class RoleInfo : Pubs.PageHandle
    {

        private string _roleName;

        public string RoleName
        {
            get { return _roleName; }
            set { _roleName = value; }
        }


        protected void Page_Load(object sender, EventArgs e)
        {

            //得到当前页的页码
            if (Request["pageNum"] != null)
            {
                CurrentPageindex = int.Parse(Request["pageNum"].ToString());
            }
            DeptInfoBand();


        }


        void DeptInfoBand()
        {

            string content = " 1=1 ";

            if (Request["pageNum"] != null)
            {
                CurrentPageindex = int.Parse(Request["pageNum"].ToString());
            }

            if (Request["RoleName"] != null && Request["RoleName"] != "")
            {
                content += " and rupName like'%" + Request["RoleName"] + "%' ";
                RoleName = Request["RoleName"].ToString();
            }

            ZY.BLL.View_Tab_RoleInfo dall = new ZY.BLL.View_Tab_RoleInfo();
            TotalCount = dall.GetRecordCount(content);
            DataSet ds = dall.GetListByPage(content, "rid desc  ", (CurrentPageindex - 1) * NumPerPage + 1, ((CurrentPageindex - 1) * NumPerPage) + NumPerPage);
            DeptList.DataSource = ds;
            DeptList.DataBind();



        }
    }
}